#define _CRT_SECURE_NO_WARNINGS 1
#include"vector.h"
#include<vector>
void test_vector1()
{
	wjx::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.print_vector();
	cout << v[3] << endl;

	v.pop_back();
	v.pop_back();
	v.print_vector();
}

void test_vector2()
{
	wjx::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.print_vector();

	v.insert(v.begin()+3, 20);
	v.print_vector();

}
void test_vector3()
{
	wjx::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.print_vector();

	vector<int> vv;
	vector<int>::iterator it = vv.begin();

}
void test_vector4()
{
	wjx::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.print_vector();

	v.erase(v. begin());
	v.print_vector();

	v.erase(v.end()-1);
	v.print_vector();
}

void test_vector5()
{
	wjx::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.print_vector();

	v.resize(3);
	v.print_vector();

	wjx::vector<int> v2(10,4);
	//v2.resize(15, 0);
	v2.print_vector();

	v = v2;
	v.print_vector();



}

int main()
{
	test_vector5();

	return 0;
}